package com.huanletao.tree;

import java.util.List;
import java.util.StringJoiner;

/**
 * <p>
 * </p>
 * package: com.huanletao.tree
 * description:
 * className: Muens
 * author:  踏雪无痕
 * copyright: Copyright (c) 2022/9/30 20:15
 * since: 1.0.0
 */
public class Muens implements TreeNode<Muens>{
    private Long id;
    private Long parentId;
    private String name;
    private List<Muens> muensList;

    @Override
    public Long getParentId() {
        return parentId;
    }

    @Override
    public void setTreeChildrenNode(List<Muens> childList) {
        this.muensList = childList;
    }

    @Override
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Muens> getMuensList() {
        return muensList;
    }

    public void setMuensList(List<Muens> muensList) {
        this.muensList = muensList;
    }

    @Override
    public List<Muens> getTreeChildrenNode() {
        return this.muensList;
    }

    @Override
    public String getNodeDisplayInfo() {
        return getName();
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Muens.class.getSimpleName() + "{", "}")
                .add("id=" + id)
                .add("parentId=" + parentId)
                .add("name='" + name + "'")
                .toString();
    }
}
